package com.example.web.bean;

import java.util.List;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import lombok.Data;

@Data
@ConfigurationProperties(prefix = "spring.datasource.db1")
public class ShardDataSource1 {
	@Value("${spring.datasource.db1.driverClassName}")
    private String driverClassName;
	@Value("${spring.datasource.db1.url}")
    private String url;
	@Value("${spring.datasource.db1.username}")
	private String username;
	@Value("${spring.datasource.db1.password}")
    private String password;
	@Value("${spring.datasource.db1.filters}")
    private String filters;
	@Value("${spring.datasource.db1.maxActive}")
    private int maxActive;
	@Value("${spring.datasource.db1.initialSize}")
    private int initialSize;
	@Value("${spring.datasource.db1.maxWait}")
    private int maxWait;
	@Value("${spring.datasource.db1.minIdle}")
    private int minIdle;
	@Value("${spring.datasource.db1.timeBetweenEvictionRunsMillis}")
    private int timeBetweenEvictionRunsMillis;
	@Value("${spring.datasource.db1.minEvictableIdleTimeMillis}")
    private int minEvictableIdleTimeMillis;
	@Value("${spring.datasource.db1.validationQuery}")
    private String validationQuery;
	@Value("${spring.datasource.db1.testWhileIdle}")
    private boolean testWhileIdle;
	@Value("${spring.datasource.db1.testOnBorrow}")
    private boolean testOnBorrow;
	@Value("${spring.datasource.db1.testOnReturn}")
    private boolean testOnReturn;
	@Value("${spring.datasource.db1.poolPreparedStatements}")
    private boolean poolPreparedStatements;
	@Value("${spring.datasource.db1.maxPoolPreparedStatementPerConnectionSize}")
    private int maxPoolPreparedStatementPerConnectionSize;
	@Value("${spring.datasource.db1.removeAbandoned}")
	private boolean removeAbandoned;
	@Value("${spring.datasource.db1.removeAbandonedTimeout}")
    private int removeAbandonedTimeout;
	@Value("${spring.datasource.db1.logAbandoned}")
    private boolean logAbandoned;
	@Value("${spring.datasource.db1.connectionInitSqls}")
    private List<String> connectionInitSqls;
	@Value("${spring.datasource.db1.connectionProperties}")
    private String connectionProperties;
}
